# Maintainer: Justin Davis (juster) <jrcd83@gmail.com>
# $Id: PKGBUILD 88491 2013-04-18 15:03:57Z bluewind $

pkgname=perl-cpanplus-dist-arch
pkgver=1.25
pkgrel=1
pkgdesc='CPANPLUS backend for building Archlinux pacman packages'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl)
url=https://metacpan.org/release/CPANPLUS-Dist-Arch
source=("http://search.cpan.org/CPAN/authors/id/J/JU/JUSTER/CPANPLUS-Dist-Arch-$pkgver.tar.gz")
md5sums=('531f85a20d118f66e1b24eace820dc57')
sha512sums=('e3f18183b57f73c221ebf328416c38891546cdead94e427be8dd2d1915969534633648a6d12d1fb55a2845fd44ea6d4fac7ffbad409b843c986d81b0fa91abb2')
_dir="CPANPLUS-Dist-Arch-$pkgver"

build()
(
  cd "$srcdir/$_dir"
  export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null
  unset PERL5LIB PERL_MB_OPT
  /usr/bin/perl Build.PL
  ./Build
)

check()
(
  cd "$srcdir/$_dir"
  export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null
  unset PERL5LIB PERL_MB_OPT
  ./Build test
)

package()
(
  cd "$srcdir/$_dir"
  export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null
  unset PERL5LIB PERL_MB_OPT
  ./Build install installdirs=vendor destdir="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
